//
//  LRXThingMainView.m
//  路人侠
//
//  Created by zhangxulong on 3/12/16.
//  Copyright © 2016 zhangxulong. All rights reserved.
//

#import "LRXThingMainScrollView.h"
@interface LRXThingMainScrollView()
@property(nonatomic,strong)LRXSubThingView *subView;
@end

@implementation LRXThingMainScrollView
/**
 *  布局每一个地点的商店和物品
 *
 *  @param places 地点数组
 */
-(void)layoutSubTableView:(NSArray *)places
{
    
    for (int i = 0; i < places.count; i++) {
        
        _subView = [[LRXSubThingView alloc]init];
        _subView.delegate = self.superController;
        _subView.placeModel = places[i];
        _subView.frame = CGRectMake(self.frame.size.width * i, 0, self.frame.size.width, self.frame.size.height);
        _subView.superController = self.superController;
        [_subView SubThingView];
        [self addSubview:_subView];
        
    }
    
}

//左右滑动 退出键盘
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
    if ([self.thingMainDelegate respondsToSelector:@selector(subTableViewScroll)]) {
        [self.thingMainDelegate subTableViewScroll];
    }
    [self endEditing:YES];
}
-(void)input{

    NSLog(@"%@",_subView);
    
}
@end
